package org.example.demo1.Entity;
public class User {
    private int user_id;
    private String username;
    private String password;
    private String email;
    private String phone;
    private int status;
    private String avatar_url;
    // 关联的角色对象

    public User() {
    }

    public User(String username, String password, String email, String phone, int status) {
        this.username = username;
        this.password = password;
        this.email = email;
        this.phone = phone;
        this.status = status;
    }

    public String getAvatar_url() {
        return avatar_url;
    }

    public void setAvatar_url(String avatar_url) {
        this.avatar_url = avatar_url;
    }

    public int getUser_id() {
        return user_id;
    }

    public void setUser_id(int user_id) {
        this.user_id = user_id;
    }

    public User(int user_id, String username, String email, String phone, int status, String avatar_url) {
        this.user_id = user_id;
        this.username = username;
        this.email = email;
        this.phone = phone;
        this.status = status;
        this.avatar_url = avatar_url;
    }

    public User(int user_id, String username, String password, String email, String phone, int status) {
        this.user_id = user_id;
        this.username = username;
        this.password = password;
        this.email = email;
        this.phone = phone;
        this.status = status;

    }
    public User(int user_id, String username, String email, String phone, int status) {
        this.user_id = user_id;
        this.username = username;
        this.email = email;
        this.phone = phone;
        this.status = status;

    }
    public User( String username, String email, String phone, int status) {
        this.username = username;
        this.email = email;
        this.phone = phone;
        this.status = status;

    }



    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }


    


    // 移除不需要的setUser_role方法，因为已经有setRole_id方法


    @Override
    public String toString() {
        return "User{" +
                "user_id=" + user_id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", email='" + email + '\'' +
                ", phone='" + phone + '\'' +
                ", status=" + status +
                ", avatar_url='" + avatar_url + '\'' +
                '}';
    }
}
